package com.xungou.core.mvc;

public abstract class AbstractService<T> implements IService<T> {
	
	protected abstract IDao<T> getDao();
	
	public int deleteByPrimaryKey(Integer id){
		return getDao().deleteByPrimaryKey(id);
	}

    public int insert(T record){
    	return getDao().insert(record);
    }

    public int insertSelective(T record){
    	return getDao().insertSelective(record);
    }

    public T selectByPrimaryKey(Integer id){
    	return getDao().selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(T record){
    	return getDao().updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(T record){
    	return getDao().updateByPrimaryKey(record);
    }
}
